package com.workflow.workflowproject.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class FlowVersionTableDef extends TableDef {

    public static final FlowVersionTableDef FLOW_VERSION = new FlowVersionTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn NAME = new QueryColumn(this, "name");

    public final QueryColumn EXIST = new QueryColumn(this, "exist");

    public final QueryColumn STATE = new QueryColumn(this, "state");

    public final QueryColumn FILE_ID = new QueryColumn(this, "file_id");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, NAME, STATE, FILE_ID, CREATE_TIME, UPDATE_TIME};

    public FlowVersionTableDef() {
        super("", "t_com_flow_version");
    }

    private FlowVersionTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public FlowVersionTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new FlowVersionTableDef("", "t_com_flow_version", alias));
    }

}
